package com.settlement.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.settlement.system.common.model.Option;
import com.settlement.system.model.entity.SysDictType;
import com.settlement.system.model.entity.SysPlatform;
import com.settlement.system.model.entity.SysPlatformIdLink;
import com.settlement.system.model.form.PlatformForm;
import com.settlement.system.model.query.PlatformPageQuery;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 平台设置 服务类
 * </p>
 *
 * @author huangrensen
 * @since 2023-08-21
 */
public interface SysPlatformService extends IService<SysPlatform> {


    /**
     * 平台分页列表
     *
     * @return
     */
    Page<SysPlatform> getPlatformPage(PlatformPageQuery queryParams);


    /**
     * 获取平台表单数据
     *
     * @param platformId
     * @return
     */
    SysPlatform getPlatformFormData(Long platformId);


    /**
     * 保存平台
     *
     * @param platformForm 平台表单对象
     * @return
     */
    boolean savePlatform(PlatformForm platformForm);

    /**
     * 删除平台
     *
     * @param idsStr 平台ID，多个以英文逗号(,)分割
     * @return
     */
    boolean deletePlatforms(String idsStr);

    SysPlatform getByPlatformKey(String platformKey);

    SysDictType getSysDictTypeByDictName(String dictName);

    SysDictType getSysDictTypeByDictCode(String dicCode);

    List<Option> getDictListFromDictType(String dictType);

    List<SysPlatformIdLink> getPlatformIdLinkListBySubNo(String platformKey, String subNo);

    List<SysPlatformIdLink> getPlatformIdLinkListByMainNo(String platformKey, String mainNo);

    List<SysPlatform> getPlatformList();
}
